import { createRouter, createWebHashHistory } from "vue-router";
const home = () => import("../view/home-pro.vue")
const details = () => import('../view/Details/details.vue')
const recommen = () => import('../view/recommen.vue')
const original = () => import('../view/original.vue')
const hot = () => import('../view/hot.vue')
const highlight = () => import('../view/highlight.vue')
const article = () => import('../view/article.vue')
const search = () => import('../view/search.vue')
const dark = () => import('../view/dark.vue')
const cricle = () => import('../view/cricle.vue')
const upload = () => import('../view/upload.vue')
const follow = () => import('../view/follow.vue')
const register = () => import('../view/register.vue')
const registerdetails = () => import('../view/commentDetails.vue')
const friendlink = () => import('../view/friendlink.vue')
const happygame = () => import('../view/happygame.vue')
const concatme = () => import('../view/concatme.vue')
const routes = [
  { path: "/", redirect: "/home" },
  {
    path: "/home",
    name: "home",
    component: home
  },
  {
    path: "/register",
    name: "register",
    component: register
  },
  {
    path: "/details",
    name: "details",
    component: details,
    redirect: '/highlight',
    children: [
      {
        path: "/highlight",
        name: "highlight",
        component: highlight
      },
      {
        path: "/happygame",
        name: "happygame",
        component: happygame
      },
      {
        path: "/concatme",
        name: "concatme",
        component: concatme
      },

      {
        path: "/registerdetails",
        name: "registerdetails",
        component: registerdetails
      },
      {
        path: "/recommen",
        name: "recommen",
        component: recommen
      },
      {
        path: "/friendlink",
        name: "friendlink",
        component: friendlink
      },
      {
        path: "/original",
        name: "original",
        component: original
      },
      {
        path: "/hot",
        name: "hot",
        component: hot
      },
      {
        path: "/article",
        name: "article",
        component: article
      },
      {
        path: "/search",
        name: "search",
        component: search
      },
      {
        path: "/dark",
        name: "dark",
        component: dark
      },
      {
        path: "/cricle",
        name: "cricle",
        component: cricle
      },
      {
        path: "/upload",
        name: "upload",
        component: upload
      },
      {
        path: "/follow",
        name: "follow",
        component: follow
      },

    ]
  },

]

export const router = createRouter({
  history: createWebHashHistory(),
  routes: routes
})

